import catgoryTree from '../../assets/json/catgoryTree'
import {getFindBanners, getFindProductType} from "../../api/index"

Page({
  data: {
    title: "店内主题",
    bannerList: [],
    productTypeArray: [
      {
        title: "醇香奶茶",
        imageUrl: "/assets/images/banner-1.png"
      },{
        title: "醇香奶茶",
        imageUrl: "/assets/images/banner-1.png"
      },{
        title: "醇香奶茶",
        imageUrl: "/assets/images/banner-1.png"
      },{
        title: "醇香奶茶",
        imageUrl: "/assets/images/banner-1.png"
      },{
        title: "醇香奶茶",
        imageUrl: "/assets/images/banner-1.png"
      }
    ]
  },

  onLoad() {
    Promise.all([
      getFindBanners(),
      getFindProductType()
    ]).then(res => {
      this.setData({
        bannerList: res[0].data,
        productTypeArray: res[1].data
      })
      console.log(res);
    })
  }
})